package codeg;

public class CodegException extends Exception {

    private static final long serialVersionUID = 1L;
    
    /**
     * Unknown error.
     */
    public static final int UNKNOWN_ERROR = 0;
    
    /**
     * The codeg bundle or class could not be read.
     */
    public static final int READ_ERROR = 1;
    
    /**
     * The codeg data could no be loaded.
     */
    public static final int DATA_ERROR = 2;
    
    /**
     * The codeg could no be saved.
     */
    public static final int SAVE_ERROR = 3;
    
    /**
     * The syntax is invalid for a codeg declaration.
     */
    public static final int SYNTAX_ERROR = 4;
    
    /**
     * No codeg could be found for the given declaration.
     */
    public static final int NOT_FOUND = 5;
    
    private int type = 0;
    
    public CodegException(String message, int type) {
        super(message);
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }
}
